package org.webball.base.abstracts;

/**
 * represents ball described by height and speed.
 * The ball moves on a parabola.
 * @author Michal Kostrzewa
 *
 */
public abstract class AbstractBall extends AbstractObject{

	private float height;
	private float speed;
	
	
	/**
	 * @return true if ball is on the ground or false if not
	 */
	public boolean isOnTheGround() {
		if(height <= 0)
			return true;
		return false;
	}
	
	/**
	 * @return height of the ball
	 */
	public float getHeight() {
		return height;
	}
	
	/**
	 * sets height of the ball
	 * @param height
	 */
	public void setHeight(float height) {
		this.height = height;
	}
	
	/**
	 * sets speed of the ball
	 * @param speed
	 */
	public void setSpeed(float speed) {
		this.speed = speed;
	}

}
